import Vue from 'vue'
import App from './App.vue'
import "@/styles/reset.less"
import router from './router'
import 'vant/lib/index.css';

import { NavBar,Swipe, SwipeItem,Lazyload,Tabbar, TabbarItem,Grid, GridItem,Icon,Button,PullRefresh,List,
    Toast,Tabs,Tab,Stepper,NoticeBar,Empty,Image as VanImage,Rate  }from 'vant';
  
  Vue.use(NavBar);
  Vue.use(Swipe);
  Vue.use(SwipeItem);
  Vue.use(Lazyload);
  Vue.use(Tabbar);
  Vue.use(TabbarItem);
  Vue.use(Grid);
  Vue.use(GridItem);
  Vue.use(Icon);
  Vue.use(Button);
  Vue.use(PullRefresh);
  Vue.use(List);
  Vue.use(Toast);
  Vue.use(Tabs);
  Vue.use(Tab);
  Vue.use(Stepper);
  Vue.use(NoticeBar);
  Vue.use(Empty);
  Vue.use(VanImage)
  Vue.use(Rate)

Vue.config.productionTip = false






new Vue({
    router,
    render: h => h(App),
}).$mount('#app')

Vue.filter('dateFormat', function(dateStr) {
    // 根据给定的时间字符串，得到特定的时间
    var dt = new Date(dateStr)

    var y = dt.getFullYear()
    var m = dt.getMonth() + 1
    var d = dt.getDate()

    return `${y}-${m}-${d}`
})